Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: Fix sb init to use renderer assets instead of frameworks #19091

Merged
merged 1 commit into from
Sep 2, 2022

Conversation

shilman
Copy link
Member

@shilman shilman commented Sep 2, 2022

Issue: N/A

What I did

In 6.5 the framework config option was one of react, angular, etc. and included Webpack settings.

In the 7.0, we’ve updated it so that these are now called renderers, and are builder-independent. Now, frameworks contain specific builder information, such as cra or nextjs (for specific app environments) or react-webpack5 / react-vite (for custom apps).

This PR:

  • fixes the sb init CLI command to use renderer-specific templates
  • adds the renderer as a dev dependency, which is important because it's reference in stories
  • calls out some follow-up work to fix automigrations & telemetry.

How to test

yarn create react-app cra-test
cd cra-test
<sbroot>/code/lib/cli/bin/index.js init

In 6.5 the `framework` config option was one of `react`, `angular`, etc. and included Webpack settings.

In the 7.0, we’ve updated it so that these are now called `renderers`, and are builder-independent. Now, frameworks contain specific builder information, such as `cra` or `nextjs` (for specific app environments) or `react-webpack5` / `react-vite` (for custom apps).

This fixes the `sb init` CLI command to use renderer-specific templates. I also call out some follow-up work to fix automigrations & telemetry
Copy link
Member

@tmeasday tmeasday left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok LGTM as long as we fix the fixmes later

@shilman
Copy link
Member Author

shilman commented Sep 2, 2022

Yup added issues

@shilman shilman merged commit 6ff0621 into next Sep 2, 2022
@shilman shilman deleted the shilman/fix-sb-init branch September 2, 2022 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants